#pragma once
#include <QObject>
#include <QRunnable>
#include <QMutex>
#include <QAtomicInteger>
#include "XCompareDir.h"
#include "XTask.h"


class XCompareRunnable : public QObject, public QRunnable
{
	Q_OBJECT
public:
	XCompareRunnable(const QString& strLeft, const QString& strRight, XTaskPtr task, QObject* p = nullptr);

public:
	virtual void run() override;

signals:
	void sigCompairResult(QVariantList data, XTaskPtr task);

private:
	void SetCompairDir(QString strLeft, QString strRight);

private:
	XCompareDir m_compair;
	XTaskPtr m_task;
	QString m_strLeft;
	QString m_strRight;
};

